<?php echo $this->fetch('header.html'); ?>
<div class="conter">
  <?php echo $this->fetch('header.common.html'); ?>
  <div class="layerbox_kuan"> 
  <form action="" method="post" id="form_box">
  <div class="layerbox">
    <table width="100%" class="table_fill">
    <tr><td colspan="2" style="padding:8px;background:#ffffe5;line-height:18px;">提示：请客户尽可能<a href="<?php echo url('app=my_kdorder&act=add'); ?>" style="color:#00F">填写运单</a>，否则运费较高。如已经填写了运单，则不需要再填写到货预报。到货预报是当您在购物网站订单成功后，获得购物网站发货到我们仓库的发货快递单号。</td></tr>
    <tr>
    <tr><td colspan="2" style="height:12px;"></td></tr>
    <tr>        
      <tr>
        <th><em>*</em>到货仓库：</th>
        <td>
        <select name="cangku" id="cangku" class="select_class">
        <option value="0">=请选择=</option>
        <?php $_from = $this->_var['category']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['list']):
?>
        <option value="<?php echo $this->_var['list']['cate_name']; ?>" <?php if ($this->_var['choose_xiangmu']['0'] == $this->_var['list']['cate_name']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']['cate_name']; ?></option>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </select>        
        </td>
      </tr>
      <tr>
        <th><em>*</em>包裹运单号：</th>
        <td><input name="yundanhao" class="text width_normal" id="yundanhao" placeholder="请填写包裹上的快递运单号"></td>
      </tr>
      <tr>
        <th><em>*</em>快递公司：</th>
        <td>
        <select name="PostOfficeID" id="PostOfficeID" class="select_class">
        <option value="">请选择</option>
        <?php $_from = $this->_var['kuaidi_data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('i', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['i'] => $this->_var['list']):
?><?php if ($this->_var['list']['type'] == "1"): ?>
        <option value="<?php echo $this->_var['list']['title']; ?>" <?php if ($this->_var['wupin']['PostOfficeID'] == $this->_var['list']['title']): ?>selected="selected"<?php endif; ?>><?php echo $this->_var['list']['title']; ?></option>
        <?php endif; ?><?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </select>
        <font color="#999999">请选择派件快递公司</font> 
        </td>
      </tr>
      <tr>
        <th><em>*</em>物品名称：</th>
        <td><input type="input" class="text width_normal" name="GoodsName" id="GoodsName" maxlength="250" placeholder="请填写物品名称"/></td>
      </tr>
      <tr>
        <th><em>*</em>物品数量：</th>
        <td><input type="input" class="text width_normal" name="GoodsCount" id="GoodsCount" onKeyUp="clearNoNum(this)" maxlength="5" placeholder="请填写物品数量，单位(件)"/> </td>
      </tr>
      <tr>
        <th><em>*</em>物品价值：</th>
        <td><input type="input" class="text width_normal" name="GoodsWorth" id="GoodsWorth" onKeyUp="clearNoNum(this)" maxlength="10" placeholder="请填写物品价值，单位($)"/></td>
      </tr>
      <tr>
        <th><em>*</em>物品重量：</th>
        <td><input type="input" class="text width_normal" name="GoodsWeight" id="GoodsWeight" onKeyUp="clearNoNum(this)" maxlength="5" placeholder="请填写物品重量，单位(LB)"/></td>
      </tr>
      <tr>
        <th>预报说明：</th>
        <td><textarea name="notes" id="notes" class="text" placeholder="可以填写其他备注说明"><?php echo $this->_var['order_info']['notes']; ?></textarea></td>
      </tr>
    </table>
  </div> 
  <p>
    <input type="button" name="imgButton" class="button_css" value="确认提交" onclick="return Check_form();" />
    <?php if ($this->_var['yubao_info']['yubao_id']): ?>
    <input type="hidden" name="yubao_id"  value="<?php echo $this->_var['order_info']['yubao_id']; ?>"/><input type="hidden" name="act"  value="edit"/>
    <?php else: ?>
    <input type="hidden" name="act"  value="add"/>
    <?php endif; ?>  
  </p>
  <p style="padding-top:10px"><span style="color:red;">客户委托承运的物品必须符合中华人民共和国法律法规要求。货物按照海关要求缴纳行邮税。请参阅：<a href="<?php echo url('app=article&act=abouts&code=charge'); ?>" class="links">收费标准</a>，<a href="<?php echo url('app=article&act=abouts&code=importduty'); ?>" class="links">行邮税率表</a>，<a href="<?php echo url('app=article&act=abouts&code=chinaimpor'); ?>" class="links">禁止进境物品</a>。</span></p>  
  </form>
  </div>
<?php echo $this->fetch('footer.html'); ?>
</div>
<script type="text/javascript">
//sumbit form
function Check_form() {
  if ($("#cangku").val() == "0") {alert("请选择到货仓库");$("#cangku").focus(); return false;}
  if ($("#yundanhao").val() == "") {alert("请输入包裹运单号");$("#yundanhao").focus(); return false;}
  if ($("#PostOfficeID").val() == "") {alert("请选择派件快递公司");$("#PostOfficeID").focus(); return false;}
  if ($("#GoodsName").val() == "") {alert("请输入物品名称");$("#GoodsName").focus(); return false;}
  if ($("#GoodsCount").val() == "") {alert("请输入物品数量");$("#GoodsCount").focus(); return false;}
  if ($("#GoodsWorth").val() == "") {alert("请输入物品价值");$("#GoodsWorth").focus(); return false;}
  if ($("#GoodsWeight").val() == "") {alert("请输入物品重量");$("#GoodsWeight").focus(); return false;}
  $("#form_box").submit();
}
function clearNoNum(obj) {
  obj.value = obj.value.replace(/[^\d.]/g, "");  //清除"数字"和"."以外的字符 
  obj.value = obj.value.replace(/^\./g, "");  //验证第一个字符是数字而不是. 
  obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的. 
  obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
}
</script>
</body>
</html>